var head = document.getElementsByClassName("head")[0];
var head_li_01 = head.getElementsByTagName("ul")[0]
				.getElementsByTagName("li")[0];

/*头部li标签鼠标移入显示地区列表*/
head_li_01.onmouseover = function(){
	this.style.backgroundColor="#fff";
	this.getElementsByClassName("dropdown")[0].style.display="block";
	// this.style.border="1px solid #ccc";
	this.style.borderBottom="none";
	this.style.borderTop="none";

}

/*头部li标签鼠标移出隐藏地区列表*/
head_li_01.onmouseout = function(){
	this.style.backgroundColor="#e3e4e5";
	this.getElementsByClassName("dropdown")[0].style.display="none";
	this.style.border="none";
}


/*设置地区*/
 var a = head_li_01.getElementsByTagName("span");
for(let i = 0; i < a.length ; i++){
	a[i].onclick=function(){
		var txt = this.innerText;
		head.getElementsByTagName("a")[0].innerText=txt;
	}
}

// var article= document.getElementsByTagName("article")[0];
// var left = article.getElementsByClassName("left")[0];
// var lis = left.getElementsByTagName("li");
// console.log(lis);

// for (var i = lis.length - 1; i >= 0; i--) {
// 	lis[i].onmouseover = function(){
// 		left.getElementsByClassName("box")[0].style.display="block";
// 	}
// }

// left.onmouseleave = function(){
// 	console.log(left);
// 	left.getElementsByClassName("box")[0].style.display="none";
// }

